/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2024-10-02
 * Time: 18:33
 */
public class Test {
    public static void main(String[] args) {
        SingleLinkedList singleLinkedList = new SingleLinkedList();
        singleLinkedList.createList();
        singleLinkedList.display();

        singleLinkedList.addFirst(1);
        singleLinkedList.addFirst(2);
        singleLinkedList.addFirst(3);
        singleLinkedList.addFirst(4);
        singleLinkedList.addFirst(5);

        singleLinkedList.display();

        singleLinkedList.addLast(6);
        singleLinkedList.addLast(7);
        singleLinkedList.addLast(8);
        singleLinkedList.addLast(9);
        singleLinkedList.addLast(10);
        singleLinkedList.addLast(11);
        singleLinkedList.addLast(12);
        singleLinkedList.addLast(13);
        singleLinkedList.addIndex(0,100);
        singleLinkedList.addIndex(2,300);
        singleLinkedList.addIndex(singleLinkedList.size(), 200);
        singleLinkedList.display();

        System.out.println(singleLinkedList.size());

        singleLinkedList.remove(13);
        singleLinkedList.remove(14);
        singleLinkedList.display();

        System.out.println(singleLinkedList.contains(12));
        System.out.println(singleLinkedList.contains(13));

        singleLinkedList.removeAllKey(13);
        singleLinkedList.display();

        singleLinkedList.clean();
        singleLinkedList.display();
    }
}
